infobar: Add a name to the css node
authorMatthias Clasen <mclasen@redhat.com>
Sun, 25 Oct 2015 21:18:20 +0000 (17:18 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 25 Oct 2015 21:18:20 +0000 (17:18 -0400)
This lets us avoid the type name in css.

gtk/gtkinfobar.c

index 01f0f48307085e1e5fd3bfe95da909a2e337fb5c..919b95cdfa75cdce505d1b40423a26fba3ae4636 100644 (file)
  * multiple <action-widget> elements. The “response” attribute specifies a
  * numeric response, and the content of the element is the id of widget
  * (which should be a child of the dialogs @action_area).
+ *
+ * # CSS nodes
+ *
+ * GtkInfoBar has a single CSS node with name infobar. The node may get
+ * one of the style classes .info, warning, .error or .question, depending
+ * on the message type.
  */
 
 enum
@@ -585,6 +591,8 @@ gtk_info_bar_class_init (GtkInfoBarClass *klass)
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkInfoBar, action_area);
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkInfoBar, close_button);
   gtk_widget_class_bind_template_child_internal_private (widget_class, GtkInfoBar, revealer);
+
+  gtk_widget_class_set_css_name (widget_class, "infobar");
 }
 
 static void